package cn.stylefeng.guns.modular.stock.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.stock.entity.StockStrategy;
import cn.stylefeng.guns.modular.stock.model.params.StockStrategyParam;
import cn.stylefeng.guns.modular.stock.model.result.StockStrategyResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xzan
 * @since 2020-03-15
 */
public interface StockStrategyService extends IService<StockStrategy> {

    /**
     * 新增
     *
     * @author xzan
     * @Date 2020-03-15
     */
    void add(StockStrategyParam param);

    /**
     * 删除
     *
     * @author xzan
     * @Date 2020-03-15
     */
    void delete(StockStrategyParam param);
    void sellDirectly(StockStrategyParam param);
    void buyDirectly(StockStrategyParam param);

    /**
     * 更新
     *
     * @author xzan
     * @Date 2020-03-15
     */
    void update(StockStrategyParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author xzan
     * @Date 2020-03-15
     */
    StockStrategyResult findBySpec(StockStrategyParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author xzan
     * @Date 2020-03-15
     */
    List<StockStrategyResult> findListBySpec(StockStrategyParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author xzan
     * @Date 2020-03-15
     */
     LayuiPageInfo findPageBySpec(StockStrategyParam param);

}
